---
layout: base
---
{%- assign _page_type = page.type | default: layout.type | default: site.data.variables.default.page.type -%}

{%- include snippets/page-title.html -%}
{%- assign _page_title = __return -%}

{%- include snippets/assign.html
  target=site.data.variables.default.page.show_header
  source0=layout.show_header source1=page.show_header -%}
{%- assign _show_header = __return -%}

{%- include snippets/assign.html
  target = site.data.variables.default.page.full_width
  source0=layout.full_width source1=page.full_width -%}
{%- assign _full_width = __return -%}

{%- include snippets/assign.html
  target=site.data.variables.default.page.show_title
  source0=layout.show_title source1=page.show_title -%}
{%- assign _show_title = __return -%}

{%- include snippets/assign.html
  target=site.data.variables.default.page.show_edit_on_github
  source0=layout.show_edit_on_github source1=page.show_edit_on_github -%}
{%- assign _show_edit_on_github = __return -%}

{%- if page.sidebar -%}
<div class="layout--page layout--page--sidebar clearfix js-page-root">
  <div class="page__actions">
    <div class="button button--circle  button--lg box-shadow-2 sidebar-button js-sidebar-show">
      <i class="fas fa-bars icon--show"></i>
    </div>
  </div>
  <div class="page__sidebar">
    {%- include sidebar/toc.html -%}
  </div>
  <div class="page__mask js-sidebar-hide"></div>

{%- else -%}
<div class="layout--page clearfix">
{%- endif -%}

  {%- if _full_width -%}
  <div class="page__main js-page-main full-width">
  {%- elsif page.aside -%}
  <div class="page__main js-page-main has-aside">
  {%- else -%}
  <div class="page__main js-page-main">
  {%- endif -%}

    <div class="page__main-inner">
    <div></div>
    {%- if _show_header -%}
      <div class="page__header">{%- include header.html -%}</div>
    {%- endif -%}

      <div class="page__content">
      {%- if _full_width == false -%}
        <div class ="main">
      {%- endif -%}

          <div class="col-aside js-col-aside">
            {%- if page.aside -%}
              <aside class="page__aside js-page-aside">
                {%- include aside/toc.html -%}
              </aside>
            {%- endif -%}
          </div>

          <div class="col-main">
            {%- if _page_type == 'article' -%}
              <article itemscope itemtype="http://schema.org/Article">
            {%- elsif _page_type == 'webpage' -%}
              <article itemscope itemtype="http://schema.org/WebPage">
            {%- else -%}
              <article>
            {%- endif -%}
              {%- if _show_title or _show_edit_on_github -%}
                <div class="article__header">
              {%- endif -%}
                  {%- if _show_title -%}
                    <header><h1 itemprop="headline">{{ _page_title }}</h1></header>
                  {%- else -%}
                    <header style="display: none;"><h1 itemprop="headline">{{ _page_title }}</h1></header>
                  {%- endif-%}
                  {%- if _show_edit_on_github -%}
                    {%- if site.repository and site.repository_tree -%}
                      {%- include snippets/locale-to-string.html locale=site.data.locale.POST_ON_GITHUB -%}
                      <span class="split-space">&nbsp;</span>
                      <a class="edit-on-github"
                        title="{{ __return }}"
                        href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">
                        <i class="far fa-edit"></i></a>
                    {%- endif -%}
                  {%- endif -%}
              {%- if _show_title or _show_edit_on_github -%}
                </div>
              {%- endif -%}

              {%- include article-info.html -%}

              <div class="js-article-content">{{ content }}</div>

              {%- if jekyll.environment != "development" and page.comment != false -%}
                <section class="page__comments">{%- include comments.html -%}</section>
              {%- endif -%}

            </article>
          </div>

      {%- if _full_width == false -%}
        </div>
      {%- endif -%}
      </div>

      <div class="page__footer">{%- include footer.html -%}</div>

    </div>
  </div>
</div>


<script>
  {%- include scripts/lib/scroll.js -%}
  {%- include scripts/lib/affix.js -%}
  {%- include scripts/lib/toc.js -%}
  {%- include scripts/page.js -%}
</script>

{%- if page.sidebar -%}
<script>
  {%- include scripts/components/sidebar.js -%}
</script>
{%- endif -%}

{%- if page.aside -%}
<script>
  /* toc must before affix, since affix need to konw toc' height. */
  {%- if page.aside.toc -%}
    {%- include scripts/aside/toc.js -%}
  {%- endif -%}
  {%- include scripts/aside/affix.js -%}
</script>
{%- endif -%}


{%- include markdown-enhancements.html -%}
{%- include pageview.html -%}
{%- include analytics.html -%}